set min and max limit for input